<template>
  <div class="home-bg">
    <div class="bg-mask"></div>
    <div class="home-content">
      <h1 class="main-title">旅行去哪儿？</h1>
      <div class="sub-title">总有你要的低价</div>
      <div class="desc">左盟 | 汇集中领领先的一站式旅行平台，渠道均以低价为核心竞争力，票价全线透明。</div>
      <div class="btn-group">
        <el-button class="main-btn" type="primary" size="large" @click="to('/flight')"><i class="el-icon el-icon-s-promotion"></i> 机票</el-button>
        <el-button class="main-btn" type="success" size="large" @click="to('/hotel')"><i class="el-icon el-icon-house"></i> 酒店</el-button>
        <el-button class="main-btn" type="warning" size="large" @click="to('/tuan')"><i class="el-icon el-icon-suitcase"></i> 度假</el-button>
        <el-button class="main-btn" type="info" size="large" @click="to('/tc')"><i class="el-icon el-icon-truck"></i> 火车</el-button>
        <el-button class="main-btn" type="danger" size="large" @click="to('/ticket')"><i class="el-icon el-icon-tickets"></i> 门票</el-button>
      </div>
    </div>
  </div>
  <!-- 网页版业务区块整体下移到此处 -->
  <div class="web-business">
    <div class="web-title">我们依然提供以下业务的网页版在线服务</div>
    <div class="web-cards">
      <el-card class="web-card strategy" shadow="hover" @click="to('/strategy')">
        <div class="card-icon"><i class="el-icon el-icon-guide"></i></div>
        <div class="card-title">旅行攻略</div>
        <div class="card-desc">630,000 个目的地<br>70,000,000 条优质攻略<br>20,000 旅行博主&KOL</div>
      </el-card>
      <el-card class="web-card holiday" shadow="hover" @click="to('/tuan')">
        <div class="card-icon"><i class="el-icon el-icon-suitcase"></i></div>
        <div class="card-title">旅游度假</div>
        <div class="card-desc">1,000,000 条度假线路<br>9,000 家资深代理商</div>
      </el-card>
      <el-card class="web-card custom" shadow="hover" @click="to('/custom')">
        <div class="card-icon"><i class="el-icon el-icon-user"></i></div>
        <div class="card-title">定制游</div>
        <div class="card-desc">2,000 个目的地专家<br>提供机票、酒店、用车服务<br>全年24小时管家服务</div>
      </el-card>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();
const to = (url) => {
  router.push(url);
};
</script>

<style scoped>
.home-bg {
  width: 1180px;
  height: 420px;
  min-height: 420px;
  background: url('@/assets/abc.jpg') center/cover no-repeat;
  background-color: #eaf6ff;
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  position: relative;
  margin: 40px auto 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-mask {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: linear-gradient(120deg, rgba(33,185,122,0.18) 0%, rgba(30,144,255,0.18) 100%);
  z-index: 1;
}
.home-content {
  position: relative;
  z-index: 2;
  background: transparent;
  border-radius: 18px;
  padding: 48px 48px 36px 48px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.main-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(33,185,122,0.08);
}
.sub-title {
  font-size: 1.6rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 1px;
}
.desc {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 32px;
  margin-top: 10px;
}
.btn-group {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 10px;
}
.main-btn {
  border-radius: 24px !important;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(30,144,255,0.08);
  transition: transform 0.18s, box-shadow 0.18s;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e90ff !important;
  border: none !important;
  color: #fff !important;
  gap: 10px;
}
.main-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 24px rgba(30,144,255,0.18);
  background: #156fd1 !important;
}
.web-business {
  margin: 80px auto 0 auto;
  max-width: 1180px;
  width: 1180px;
  height: 400px;
  text-align: center;
}
.web-title {
  font-size: 1.5rem;
  color: #222;
  font-weight: 600;
  margin-bottom: 38px;
  letter-spacing: 1px;
}
.web-cards {
  display: flex;
  gap: 36px;
  justify-content: center;
}
.web-card {
  width: 300px;
  cursor: pointer;
  border-radius: 22px;
  transition: box-shadow 0.2s, transform 0.18s;
  text-align: left;
  min-height: 210px;
  background: linear-gradient(120deg, #eaf6ff 0%, #f8faff 100%);
  box-shadow: 0 2px 12px rgba(30,144,255,0.06);
  border: none;
  position: relative;
  overflow: hidden;
}
.web-card .card-icon {
  font-size: 2.2rem;
  color: #1e90ff;
  margin-bottom: 10px;
  margin-top: 18px;
}
.web-card .card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #179c63;
}
.web-card .card-desc {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
}
.web-card.strategy {
  border-top: 4px solid #21b97a;
}
.web-card.holiday {
  border-top: 4px solid #409eff;
}
.web-card.custom {
  border-top: 4px solid #a259ec;
}
.web-card:hover {
  box-shadow: 0 8px 32px rgba(30,144,255,0.18);
  transform: translateY(-4px) scale(1.04);
}
@media (max-width: 1280px) {
  .home-bg, .web-business {
    width: 98vw;
    max-width: 98vw;
  }
}
</style>